package gsutil

import (
	"crypto/md5"
	"fmt"
	"strings"
)

var EncryptUtil = encryptUtil{}

type encryptUtil struct {
}

func (x *encryptUtil) Md5(data string) string {
	if data == "" {
		return ""
	}

	return strings.ToLower(fmt.Sprintf("%x", md5.Sum([]byte(data))))
}
